<template>
  <span class="undo" v-if='obj.result==null'>{{index+1}}: 未完成</span>
  <span class="right" v-else-if='obj.left+obj.right===obj.result'>{{index+1}}:正确</span>
  <span class="error" v-else>{{index+1}}: 错误</span>
</template>
<script>
export default {
props:{
  obj:{
    type:Object,
    required:true
  },
  index:{
    type:Number,
    required:true
  }
}
};
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>